package epic.domain;

/**
 * Possible {@link Hero} decisions.
 * 
 * @author Artem Kozlov
 * @date 25.01.2011
 */
public enum PathDecision {

    /**
     * Not make decision yet.
     */
    UNDEFINED(0),
    /**
     * Not make decision at all.
     */
    SCARED(1),
    
    LEFT(2),
    
    STRAIGHT(3),
    
    RIGHT(4);
    
    private int descisionId;

    private PathDecision(int descisionId) {
        this.descisionId = descisionId;
    }

    public int getDescisionId() {
        return descisionId;
    }

    public static PathDecision getDescisionById(int descisionId) {
        for (PathDecision decision : values()) {
            if (decision.getDescisionId() == descisionId) {
                return decision;
            }
        }

        throw new IllegalArgumentException("There no PathDescription with id = " + descisionId);
    }
}
